import java.util.ArrayDeque;

/**
 * This class is Queue
 * which does BFS algorithm 
 * @author ldong
 *
 * @param <E>
 */
public class MyQ <E> implements DataStructure<E> 
{

	private ArrayDeque<E> dq;
	
	/**
	 * Constructor
	 */
	public MyQ()
	{
		dq = new ArrayDeque<E>();
	}
	@Override
	public void add(E item) {
       dq.add(item);		
	}

	@Override
	public E remove() {
		return dq.poll(); 
	}

	@Override
	public boolean isEmpty() {
		return dq.isEmpty();
	}

}
